#!/usr/bin/env python3


def init_db():
    import os
    import sys

    if "peers_identity" not in sys.path:
        sys.path.insert(0, os.path.abspath("./src/peers_identity"))
    if "peers_identity" not in sys.path:
        sys.path.insert(0, os.path.abspath("../src/peers_identity"))
    from models import get_base_class, get_engine

    engine = get_engine()

    Base, session = get_base_class()
    Base.metadata.drop_all(bind=engine)
    Base.metadata.create_all(bind=engine)


if __name__ == "__main__":
    init_db()
